package myJs.myPkg

import jsext._

import scala.scalajs.js
import scala.language.implicitConversions
import scala.scalajs.js.JSConverters._
import jquery.JQuery


/**
 * Created by yz on 2019/3/14
 */
@js.native
trait LevelUpJQuery extends js.Object {

  def levelup(options: LevelUpOptions): JQuery = scalajs.js.native

  def levelup(method: String, arg: Int): JQuery = scalajs.js.native

}

object LevelUpOptions extends LevelUpOptionsBuilder(noOpts)

class LevelUpOptionsBuilder(val dict: OptMap) extends JSOptionBuilder[LevelUpOptions, LevelUpOptionsBuilder](new LevelUpOptionsBuilder(_)) {

  def start(v: Int) = jsOpt("start", v)

  def value(v: Int) = jsOpt("value", v)


}

trait LevelUpOptions extends js.Object {

}

trait LevelUpJQueryImplicits {
  implicit def implicitLevelUpJQuery(jq: JQuery): LevelUpJQuery = {
    jq.asInstanceOf[LevelUpJQuery]
  }
}
